!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react")):"function"==typeof define&&define.amd?define("rb_wixui.thunderbolt[TextAreaInput]",["react"],t):"object"==typeof exports?exports["rb_wixui.thunderbolt[TextAreaInput]"]=t(require("react")):e["rb_wixui.thunderbolt[TextAreaInput]"]=t(e.React)}("undefined"!=typeof self?self:this,(function(e){return function(){var t={40841:function(e,t){var r; /*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */!function(){"use strict";var o={}.hasOwnProperty;function n(){for(var e=[],t=0;te.map((e=>`wixui-${e}`)).join(" ");function l(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var n=0;for(o=Object.getOwnPropertySymbols(e);n{t.keyCode===e&&(t.preventDefault(),t.stopPropagation(),t.currentTarget.click())}}d(32),d(u),d(c);var p={root:"text-box",label:"text-box__label",input:"text-box__input"};const f=e=>{var{size:t}=e,o=l(e,["size"]);return r.createElement("svg",Object.assign({viewBox:"0 0 20 20",fill:"currentColor",width:t||"20",height:t||"20"},o),r.createElement("path",{fillRule:"evenodd",d:"M9.5,3 C13.084,3 16,5.916 16,9.5 C16,13.084 13.084,16 9.5,16 C5.916,16 3,13.084 3,9.5 C3,5.916 5.916,3 9.5,3 Z M9.5,4 C6.467,4 4,6.467 4,9.5 C4,12.533 6.467,15 9.5,15 C12.533,15 15,12.533 15,9.5 C15,6.467 12.533,4 9.5,4 Z M10,11 L10,12 L9,12 L9,11 L10,11 Z M10,7 L10,10 L9,10 L9,7 L10,7 Z"}))};f.displayName="ErrorSmall";var v=f,b="TLWrjM",y="GIPQqH",x="JNgJbf";const m="Error text displays here.",g=e=>{let t=e.errorMessage,o=e.errorMessageType,n=e.shouldShowValidityIndication,a=e.translate,i=e.translations.defaultErrorMessage;const s="editor"===e.componentViewMode?a?a("wixui",i,m):m:t;return"inline"===o&&n&&s?r.createElement("div",{className:b},r.createElement(v,{className:y}),r.createElement("span",{className:x},s)):null};var h={TextAreaDefaultSkin:"snt4Te",textAreaDefaultSkin:"snt4Te",textarea:"rEindN","validation-indication":"pOExcs",validationIndication:"pOExcs",label:"PSkPrR",hasLabel:"oKe0Po","required-indication":"NyPO4H",requiredIndication:"NyPO4H",ResponsiveTextAreaDefaultSkin:"lk9PkF",responsiveTextAreaDefaultSkin:"lk9PkF"};const O=()=>{},w=(e,o)=>{var n;const a=e.skin,u=e.id,c=e.className,d=e.customClassNames,f=void 0===d?[]:d,v=e.value,b=void 0===v?"":v,y=e.label,x=e.placeholder,m=e.readOnly,w=e.required,j=e.isDisabled,S=e.maxLength,M=e.isResponsive,C=e.shouldShowValidityIndication,E=e.isValid,P=e.errorMessageType,_=void 0===P?"tooltip":P,T=e.validateValue,I=void 0===T?O:T,k=e.onValueChange,L=void 0===k?O:k,V=e.setValidityIndication,A=void 0===V?O:V,D=e.onBlur,N=void 0===D?O:D,R=e.onFocus,q=void 0===R?O:R,B=e.onKeyPress,F=void 0===B?O:B,Z=e.onInput,H=void 0===Z?O:Z,K=e.onChange,z=void 0===K?O:K,J=e.onClick,U=void 0===J?O:J,W=e.onDblClick,$=void 0===W?O:W,G=e.onMouseEnter,Q=void 0===G?O:G,X=e.onMouseLeave,Y=void 0===X?O:X,ee=e.ariaAttributes,te=e.componentViewMode,re=r.useState(),oe=re[0],ne=re[1],ae=r.useRef(null);r.useImperativeHandle(o,(()=>({focus:()=>{var e;null==(e=ae.current)||e.focus()},blur:()=>{var e;null==(e=ae.current)||e.blur()},setCustomValidity:e=>{var t;"message"===e.type&&(null==(t=ae.current)||t.setCustomValidity(e.message))}})));const ie=!!y,se=i()(h[a],c,s(p.root,...f),{[h.hasLabel]:ie,[h.requiredIndication]:w,[h.validationIndication]:!!C});return r.createElement("div",t()({id:u},(e=>Object.entries(e).reduce(((e,[t,r])=>(t.includes("data-")&&(e[t]=r),e)),{}))(e),{className:se,onClick:e=>{j||U(e)},onDoubleClick:e=>{j||$(e)},onMouseEnter:e=>{j||Q(e)},onMouseLeave:e=>{j||Y(e)}}),r.createElement("label",{htmlFor:"textarea_"+u,className:i()(h.label,s(p.label))},y),r.createElement("textarea",t()({ref:ae,id:"textarea_"+u,className:i()(h.textarea,"has-custom-focus",s(p.input)),rows:M?1:void 0,value:b,onFocus:q,onKeyDown:F,onChange:e=>{L(e.currentTarget.value),I(),ne(!0),A(!1),e.type="input",H(e)},onBlur:e=>{A(!0),N(e),oe&&z(t()({},e,{type:"change"})),ne(!1)},placeholder:x,readOnly:m,required:w,"aria-required":w,"aria-invalid":C?E:void 0,maxLength:null===S?void 0:S,disabled:j},((e={})=>{var t,{pressed:r,expanded:o,haspopup:n,label:a,live:i,relevant:s,current:u,owns:c,controls:d,roleDescription:p,hidden:f,disabled:v,describedBy:b,labelledBy:y,errorMessage:x,atomic:m,role:g,busy:h}=e,O=l(e,["pressed","expanded","haspopup","label","live","relevant","current","owns","controls","roleDescription","hidden","disabled","describedBy","labelledBy","errorMessage","atomic","role","busy"]);const w=null!==(t=O.tabIndex)&&void 0!==t?t:O.tabindex,j={};return a&&(j["aria-label"]=a),i&&(j["aria-live"]=i),u&&(j["aria-current"]=u),r&&(j["aria-pressed"]=r),"boolean"==typeof f&&(j["aria-hidden"]=f),"boolean"==typeof o&&(j["aria-expanded"]=o),"boolean"==typeof v&&(j["aria-disabled"]=v),"boolean"==typeof m&&(j["aria-atomic"]=m),"boolean"==typeof h&&(j["aria-busy"]=h),"string"==typeof s&&(j["aria-relevant"]=s),"string"==typeof c&&(j["aria-owns"]=c),"string"==typeof d&&(j["aria-controls"]=d),"string"==typeof p&&(j["aria-roledescription"]=p),n&&(j["aria-haspopup"]=n),"number"==typeof w&&(j.tabIndex=w),g&&(j.role=g),b&&(j["aria-describedby"]=b),y&&(j["aria-labelledby"]=y),x&&(j["aria-errormessage"]=x),j})(ee))),r.createElement(g,{errorMessageType:_,errorMessage:null==(n=ae.current)?void 0:n.validationMessage,shouldShowValidityIndication:C,translate:e.translate,translations:{defaultErrorMessage:"Text_Area_On_Stage_Error_Text_Label"},componentViewMode:te}))};var j=r.forwardRef(w);const S=(e,o)=>r.createElement(j,t()({isResponsive:!1,ref:o},e));const M=(e,o)=>r.createElement(j,t()({isResponsive:!0,ref:o},e));const C={TextAreaDefaultSkin:r.forwardRef(S),ResponsiveTextAreaDefaultSkin:r.forwardRef(M)},E=(e,o)=>{const n=e.skin,a=C[n];return r.createElement(a,t()({ref:o},e))};const P=e=>e.replace(/([A-Z])/g,(e=>`-${e.toLowerCase()}`));var _;const T={TextAreaInput:{component:r.forwardRef(E),controller:(_=e=>{let r=e.mapperProps,o=e.controllerUtils;return t()({},r,(n=o.updateProps,{onValueChange:e=>{n({value:e})},setValidityIndication:e=>{n({shouldShowValidityIndication:e})}}));var n},{useComponentProps:(e,t,r)=>{const o=(e=>Object.assign(Object.assign({},e),{updateStyles:t=>{const r=Object.entries(t).reduce(((e,[t,r])=>{return Object.assign(Object.assign({},e),{[(o=t,o.startsWith("--")?t:P(t))]:void 0===r?null:r});var o}),{});e.updateStyles(r)}}))(r);return _({mapperProps:e,stateValues:t,controllerUtils:o})}})}}}(),n}()})); //# sourceMappingURL=https://static.parastorage.com/services/editor-elements-library/dist/thunderbolt/rb_wixui.thunderbolt[TextAreaInput].e593c56a.bundle.min.js.map